package com.example.mywechatprogram.controller;

import com.example.mywechatprogram.entity.Response;
import com.example.mywechatprogram.entity.Word;
import com.example.mywechatprogram.mapper.WordMapper;

import com.example.mywechatprogram.service.WordService;

import com.example.mywechatprogram.service.WordService;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class WordController {
    @Autowired
    private WordService wordService;
    @PostMapping("/Word/request")
    public Response request(String userId,String bookId){
        return wordService.request(userId,bookId);
    }
    @PostMapping("/Word/finish")
    public Response finish(int word_id,String userId,String bookId){
        return wordService.finish(word_id,userId,bookId);
    }
}
